package com.haoshuang.zhouzhoubang.ui.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter4.BaseQuickAdapter
import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.ItemServiceImageBinding
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter


/**
 * 技能标签列表适配器
 */
class ServiceCaseImageAdapter(data: MutableList<String>):
    BaseBindingQuickAdapter<String, ItemServiceImageBinding>(data) {
    override fun onBindViewHolder(holder: BaseBindingHolder, position: Int, item: String?) {
        val binding = ItemServiceImageBinding.bind(holder.itemView)
        binding.apply {
            Glide.with(context)
                .load(item)
                .placeholder(R.mipmap.default_image)
                .error(R.mipmap.default_image)
                .into(image)
        }
    }
}